#ifndef NANOIO_H
#define NANOIO_H

#include <stdint.h>

class NanoIO
{
public:
    NanoIO(const char* typeName);
    virtual ~NanoIO();
    virtual bool open() = 0;
    virtual bool close() = 0;
    virtual bool isOpen() = 0;
    virtual int read(uint8_t* data , uint16_t len , uint32_t timeout_ms) = 0;
    virtual int write(uint8_t* data , uint16_t len , uint32_t timeout_ms) = 0;

    NanoIO& operator<<(const char* str);

private:
    char _typeName[32];
};

#endif // NANOIO_H
